<!DOCTYPE html>
<html>
<head>
	<title>登陆页面</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- head 中 -->
<link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.2/style/weui.min.css">
<link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.min.css">

<!-- body 最后 -->
<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/jquery-weui.min.js"></script>

<!-- 如果使用了某些拓展插件还需要额外的JS -->
<script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/swiper.min.js"></script>
<script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/city-picker.min.js"></script>

<style>
.weui-conter{
text-align:center;
font-size: xx-large;
}
.my-cells{
height: 3rem;	
}
.my-input{
	font-size: 1rem;
	padding-left: 0.2rem;
	height: 3rem;
    width: 15rem;
}
.my-input::-webkit-input-placeholder{
    font-size: 1.1rem;
    line-height: 50px;
    text-align: center;
}
.my-lable{
font-size: 1.3rem;
}
.my-btn {
    background-color: #949f94;
    }
.my-hd{
width: 20%;
}
 .my-hds{
width: 80%;

 }  
.my-ft{

	width: 20%;
}
.my-btn{
background-color: #ffffff;
position: relative;
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    box-sizing: border-box;
    font-size: 18px;
    text-align: center;
    text-decoration: none;
    color: #5d5d5d;
    line-height: 2.85555556;
    border-radius: 5px;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    overflow: hidden;
}
.my-btns{
width: 23rem;
background-color: #9a9494;
    position: relative;
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding-left: 14px;
    padding-right: 14px;
    box-sizing: border-box;
    font-size: 18px;
    text-align: center;
    text-decoration: none;
    color: #fff;
    line-height: 4;
    border-radius: 5px;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    overflow: hidden;
}    
</style>
</head>
<body>
<div class="weui-cells my-cells">
  <div class="weui-cell">
    <div class="weui-cell__bd weui-conter">
      <p>手机快捷登陆</p>
    </div>
    <div class="weui-cell__ft"></div>
  </div>
</div>
<hr/>
<div class="weui-cells weui-cells_form">
  <div class="weui-cell">
  <div class="weui-cell weui-cell_vcode">
    <div class="weui-cell__hd my-hd">
      <label class="weui-label my-lable">签订人</label>
    </div>
    <div class="weui-cell__bd my-hds">
      <input class="weui-input my-input" type="text" placeholder="请输入签订人姓名" value="" style="font-size:22px;" >
    </div>
    <div class="weui-cell__ft my-ft">
     <a href="javascript:;" class="weui-btn weui-btn_plain-default my-btn">搜索</a>
    </div>
  </div>
</div>
<hr/>
<div class="my-radio">
<div class="weui-cells weui-cells_checkbox my-radio-ss">
    <!--<label class="weui-cell weui-check__label" for="s11">
      <input id="id" name="ID" type="hidden"/>
      <div class="weui-cell__hd">
        <input type="checkbox" class="weui-check" name="checkbox1" id="s11">
        <i class="weui-icon-checked"></i>
      </div>
      <div class="weui-cell__bd">
        <p>standard is dealt for u.</p>
      </div>
    </label>
    <label class="weui-cell weui-check__label" for="s12">
      <div class="weui-cell__hd">
        <input type="checkbox" name="checkbox1" class="weui-check" id="s12">
        <i class="weui-icon-checked"></i>
      </div>
      <div class="weui-cell__bd">
        <p>standard is dealicient for u.</p>
      </div>
    </label>
-->
</div>
</div>
<a href="javascript:;" class="weui-btn weui-btn_primary my-btns" onclick="mybtns()">绑定</a>
</div>
</body>
<script type="text/javascript">
//查询签订人信息
$(".weui-btn.weui-btn_plain-default.my-btn").click(function(){
    $(".my-radio-ss").html("");
	var name = $(".my-input").val();
	$.ajax({
            url: "/WeixinConController/landfindbyname",
            data: {NAME:name},
            dataType: "json",
            type: "post",
            async: false,
            success: function (res) {
                if (res.errcode === "0") {
                    for(var i =0;i<res.data.length;i++){
                        var str = ' <label class="weui-cell weui-check__label" for="'+i+'">\n' +
                            '      <input id="id" name="ID" type="hidden" value="'+res.data[i].ID+'"/>\n' +
                            '      <div class="weui-cell__hd">\n' +
                            '        <input type="checkbox" class="weui-check" name="checkbox1" id="'+i+'">\n' +
                            '        <i class="weui-icon-checked"></i>\n' +
                            '      </div>\n' +
                            '      <div class="weui-cell__bd">\n' +
                            '        <p>'+res.data[i].SIGNER+'</p>\n' +
                            '      </div>\n' +
                            '    </label>';
                        $(".my-radio-ss").append(str);
                    }
                } else if (res.errcode === "1") {
                    layer.msg(res.errmsg, function () {
                    });
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.error(XMLHttpRequest.status);
                console.error(XMLHttpRequest.readyState);
                console.error(textStatus);
            }
        });
	});
//获取复选框的ID
function mybtns () {
    var arr =new Array();
    $("input:checkbox:checked").each(function(i){
      arr[i] = $(this).parent().parent().find("input[name='ID']").val();
    });
   var vals = arr.join(",");//获取复选框的ID
    $.ajax({
        url: "/weixin/submit_con",
        data: {con_list:vals},
        dataType: "json",
        type: "post",
        async: false,
        success: function (res) {
            if (res.errcode === "0") {
                alert("提交成功，等待审核");
            } else if (res.errcode === "1") {
                layer.msg(res.errmsg, function () {
                });
            }
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            console.error(XMLHttpRequest.status);
            console.error(XMLHttpRequest.readyState);
            console.error(textStatus);
        }
    });
}
</script>
</html>
